package com.ponxu.mb.web.filter;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ponxu.log.Log;
import com.ponxu.log.LogFactory;

/**
 * 博客过滤器(包含之前的所有过滤功能, 简短过滤链)
 * 
 * @author xwz
 * 
 */
public class BlogFilter implements Filter {
	private static final Log LOG = LogFactory.getLog();

	public void doFilter(ServletRequest req, ServletResponse res,
			FilterChain chain) throws IOException, ServletException {
		LOG.debug("----------BlogFilter begin----------");
		HttpServletRequest request = (HttpServletRequest) req;
		HttpServletResponse response = (HttpServletResponse) res;
		boolean processed = false;

		if (!processed) {
			chain.doFilter(request, response);
		}

		LOG.debug("----------BlogFilter end----------");
	}

	public void init(FilterConfig fConfig) throws ServletException {
	}

	public void destroy() {
	}
}
